const fs = require('fs')
let title = fs.readFileSync('./title.txt', 'utf-8')
let arr = title.split('==========')

let img = fs.readFileSync('./img.txt', 'utf-8')
let brr = img.split('==========')

let discout = fs.readFileSync('./discout.txt', 'utf-8')
let crr = discout.split('==========')

let price = fs.readFileSync('./price.txt', 'utf-8')
let drr = price.split('==========')

let marketp = fs.readFileSync('./marketp.txt', 'utf-8')
let frr = marketp.split('==========')

let logo = fs.readFileSync('./logo.txt', 'utf-8')
let grr = logo.split('==========')

let fangda1 = fs.readFileSync('./fangda1.txt', 'utf-8')
let hrr = fangda1.split('==========')

let fangda2 = fs.readFileSync('./fangda2.txt', 'utf-8')
let irr = fangda2.split('==========')

let fangda3 = fs.readFileSync('./fangda3.txt', 'utf-8')
let jrr = fangda3.split('==========')

let fangda4 = fs.readFileSync('./fangda4.txt', 'utf-8')
let krr = fangda4.split('==========')

let fangda5 = fs.readFileSync('./fangda5.txt', 'utf-8')
let lrr = fangda5.split('==========')



let  mrr = []
arr.forEach((item, index) => {
    mrr.push({
        title: item,
        img: brr[index],
        discout:crr[index],
        price:drr[index],
        marketp:frr[index],
        logo:grr[index],
        id:index-0+1,
        fangda1:hrr[index],
        fangda2:irr[index],
        fangda3:jrr[index],
        fangda4:krr[index],
        fangda5:lrr[index],

    })
})

fs.writeFileSync('./goodlist.json', JSON.stringify(mrr))